how to create json server post method